<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-10-12
 * Time: 15:15
 */
namespace app\api\controller;
use think\Db;
use think\Request;

class Region
{
   public function city(Request $request)
   {
        $upid = $request->param("upid");
        $list = Db::name("district")->where("upid",$upid)->select();
        if($list){
            return json(["code"=>200,"list"=>$list]);
        }else{
            return json(["code"=>201]);
        }
   }
}